<include file="template:style"/>
<form role="form" id="searchForm" action="{:U('Admin/index')}" method='post' class="form-horizontal">
    <div class="form-group">
        <include file="template:search" results="params" name="account" label="账号" attr='data-rule="length(~20)" maxlength="20"'/>
        <include file="template:search" results="params" name="name" label="名称" attr='data-rule="length(~30)" maxlength="30"'/>
        <include file="template:select" results="params" name="isdisable" list="isDisable" label="是否禁用" attr=''/>
        <include file="template:select" results="params" name="pageSize" list="page" label="每页条数" />
        <div class="col-xs-12">
            <div class="col-xs-4 col-sm-3 col-md-2 col-lg-1 pull-left">
                <div class="row">
                    <include file="template:addBtn" url="{:U('Admin/add')}" height="550px" width="450px"/>
                </div>
            </div>
            <div class="col-xs-4 col-sm-3 col-md-2 col-lg-1">
                <div class="row">
                    <span></span>
                </div>
            </div>
            <div class="col-xs-4 col-sm-3 col-md-2 col-lg-1 pull-right">
                <div class="row">
                    <include file="template:searchBtn"/>
                    <include file="template:reloadBtn"/>
                </div>
            </div>
        </div>
    </div>
</form>
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th nowrap="nowrap">ID</th>
            <th nowrap="nowrap">账号</th>
            <th nowrap="nowrap">名称</th>
            <th nowrap="nowrap">是否禁用</th>
            <th nowrap="nowrap">创建日期</th>
            <th nowrap="nowrap">更新日期</th>
            <th nowrap="nowrap">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
            <tr>
                <td nowrap="nowrap">{$vo.id}</td>
                <td nowrap="nowrap">{$vo.account}</td>
                <td nowrap="nowrap">{$vo.name}</td>
                <td nowrap="nowrap">{$vo.isdisable|getDropdownList="isDisable",###}</td>
                <td nowrap="nowrap">{$vo.createtime}</td>
                <td nowrap="nowrap">{$vo.updatetime}</td>
                <td nowrap="nowrap">
                    <!-- 自己不能操作自己 -->
                    <neq name="vo.id" value="$account.id">
                        <!-- 启用、禁用 -->
                        <eq name="vo.isdisable" value="1">
                            <i class="fa fa-play qg-tooltip qg-op-btn" data-toggle="tooltip" data-placement="top" title="启用" onclick="confirmUpdate('{:U(\'Admin/enable\')}','{$vo.id}','确定要启用吗？')"></i>
                            <else/>
                            <i class="fa fa-stop qg-tooltip qg-op-btn" data-toggle="tooltip" data-placement="top" title="禁用" onclick="confirmUpdate('{:U(\'Admin/disable\')}','{$vo.id}','确定要禁用吗？')"></i>
                        </eq>
                        <!--编辑资料-->
                        <i class="fa fa-edit qg-op-btn qg-tooltip" data-toggle="tooltip" data-placement="top" title="编辑" onclick="modal('{:U(\'Admin/edit\', array(\'id\'=>$vo[\'id\']))}', '编辑','550px','450px')"></i>
                        <!--删除-->
                        <i class="fa fa-trash-o qg-tooltip qg-op-btn" data-toggle="tooltip" data-placement="top" title="删除" onclick="confirmUpdate('{:U(\'Admin/delete\')}','{$vo.id}','确定要删除吗？')"></i>
                    </neq>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
</div>
{$page}